<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@1.6/lib/index.css">

		<!-- 引入组件 -->
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/vant@1.6/lib/vant.min.js"></script>
		<link rel="stylesheet" type="text/css" href="css/main.css" />
	</head>
	<body>
		<div id="app">
			<header style="margin-top: 20px;margin-bottom: 20px;">
				<van-search placeholder="请输入搜索关键词" v-model="value" />
			</header>
			<section>
				<van-row>
					<van-col span="6">
						<van-badge-group :active-key="activeKey" @change="onChange">
							<van-badge title="手机" @click="a"></van-badge>
							<van-badge title="酒水饮料" @click="b"></van-badge>
							<van-badge title="厨房用具"></van-badge>
							<van-badge title="内衣内裤"></van-badge>
							<van-badge title="日用百货"></van-badge>
						</van-badge-group>
					</van-col>
					<van-col span="18">
						<iframe id="bb" src="jingd/new_file.html" frameborder="0" align="center"></iframe>
					</van-col>
					
				</van-row>
				
			</section>
			<footer>
				<van-tabbar v-model="active">
					<van-tabbar-item icon="home-o">首页</van-tabbar-item>
					<van-tabbar-item icon="shop-o">分类</van-tabbar-item>
					<van-tabbar-item icon="shopping-cart-o">购物车</van-tabbar-item>
					<van-tabbar-item icon="user-o">个人中心</van-tabbar-item>
				</van-tabbar>
			</footer>
	</body>
	<script src="../js/jquery-2.1.0.js"></script>
	<script>
		var vm = new Vue({
			el: "#app",
			data: {
				active: 0,
				value: "",
				activeKey: ""
			},
			methods: {
				tabChange: function() {
					plus.webview.show(this.views[this.active].name);
				},
				onChange(key) {
					this.activeKey = key;
				},
				a: function(){
                      var a=document.getElementById("bb");
					  a.src="jingd/new_file.html"
					  
				},
				b: function(){
				      var b=document.getElementById("bb");
					  b.src="jingd/分类2.html"
					  
				}
			},
			mounted: function() {
				var _this = this;
				document.addEventListener('plusready', function() {
					var currentWebView = plus.webview.currentWeb();
					for (var i = 0; i < _this.views.length; i++) {
						var tempWebView = plus.webview.create(_this.views[i].url, this.views[i], name, {
							top: "46px",
							bottom: "50px",
							scrollIndicator: "none",
							zindex: 1
						});
						currentWebView.append(tempWebView);
					}
					plus.webview.show(_this.views[0], name)
				})
			
		},

		})
	</script>
</html>
